package gstyle.item;

public class Unit {
    private double units;
    private String postfix;

    private Unit (double units, String postfix) {
        this.units = units;
        this.postfix = postfix;
    }

    public String css() {
        return units + postfix;
    }

    public static Unit px(double units) {
        return new Unit(units, "px");
    }

    public static Unit em(double units) {
        return new Unit(units, "em");
    }

    public static Unit pt(double units) {
        return new Unit(units, "pt");
    }

    public static Unit percent(double units) {
        return new Unit(units, "%");
    }
}
